/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: atp
 * Date: 2022-10-20
 * Time: 15:52
 */
class Animal {
    public String name;
    public int age;
    public void eat() {
        System.out.println(name + "吃饭");
    }
}
class Dog extends Animal {
    public String color;
    public void nurse() {
        System.out.println(name + "正在看家护院！");
    }
}
class Cat extends Animal {
    public void catchMouse() {
        System.out.println(name + "抓老鼠");
    }
}

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Cat cat = new Cat();
    }
}
